home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…rary 6 (Reseller Edition) / Apple Ref. & Pres. Lib.v6.0.toast / pc / Ref & Pres Lib. v6.0 Reseller / stack_-1.xml < prev    next >
Encoding:
Extensible Markup Language  |  1990-12-20  |  37.5 KB  |  227 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.0 Reseller</name>
  5.     <id>-1</id>
  6.     <cardCount>203</cardCount>
  7.     <cardID>13593</cardID>
  8.     <listID>19176</listID>
  9.     <cantModify><true /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><true /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>------------------------------------------------------------------------
  17. --                Stack: Ref & Pres Lib. v6.0b4 Reseller              --
  18. --                          ¬©1990 Medior, Inc.                        --
  19. --                      ¬©1990 Apple Computer, Inc.                    --
  20. --                                                                    --
  21. --                           12/19/90 7:32 PM                         --
  22. --                            Version: 6.0b4                          --
  23. ------------------------------------------------------------------------
  24.  
  25. -- XCMDs to follow:
  26. -- #   985    CopyFolder      ¬© Fr√©d√©ric Rinaldi
  27. -- #  2985    FileCopy        ¬© Fr√©d√©ric Rinaldi
  28. -- #  1047    NewFolder       ¬© Guy de Picciotto
  29. -- #  1142    Prompt          ¬© Fr√©d√©ric Rinaldi
  30. -- #   983    RemoveFolder    ¬© Fr√©d√©ric Rinaldi
  31. -- # 10036    SwitchXRoo      ¬© 1990 Bill Steinberg
  32. -- #    77    TitleBar        ¬© Apple Computer, Inc.
  33. -- # 12027    zoomRect        ¬© Apple Computer, Inc.
  34.  
  35. -- XFCNs to follow:
  36. -- # 12154    ApplicationList
  37. -- # 14000    ApplMemory      ¬© Apple Computer, Inc.
  38. -- # 12505    ApplSize        ¬© Apple Computer, Inc.
  39. -- #  4008    DeleteFile      ¬© Apple Computer, Inc.
  40. -- # 30025    DiskSpaceAvail  ¬© Peter Meyer
  41. -- # 13006    FileExists      ¬© Apple Computer, Inc.
  42. -- # 13008    FileSize        ¬© Apple Computer, Inc.
  43. -- #  9119    folderPath      ¬© David Fry
  44. -- #  1000    FolderSize      ¬© Fr√©d√©ric Rinaldi
  45. -- #   800    ListSelect      ¬© Fr√©d√©ric Rinaldi
  46. -- # 12040    MFIsRunning     ¬© Apple Computer, Inc.
  47. -- # 12045    sysEnvironment  ¬© Apple Computer, Inc.
  48. -- #   971    SystemFolder    ¬© 1989 By the Trustees of Dartmouth College
  49. -- # 12053    TotalRAM        ¬© Apple Computer, Inc.
  50. -- # 12067    VolumeList      ¬© Apple Computer, Inc.
  51. ------------------------------------------------------------------------
  52.  
  53. on closeStack
  54. global gLockFlag
  55. if gLockFlag is not true then
  56. repeat until not the lockscreen
  57. set lockscreen to false
  58. end repeat
  59. else put "" into gLockFlag
  60. end closeStack
  61.  
  62. on resumeStack
  63. spinCursor
  64. send openCard to this cd
  65. openStack
  66. set userModify to TRUE
  67. pass resumeStack
  68. end resumeStack
  69.  
  70. on openStack
  71. global gMainStack6,gCdNameList6,gCdIDList6,MFinder
  72. global gCDVolume6,gGlobalInit6,gLastMenu6,gMenuSelection6
  73. global gPaths6,gAppList6,gTheDepths6,gNoLaunch6
  74. global RPStackName
  75. if the userLevel < 2 then set the userLevel to 2
  76. put "Apple Ref. & Pres. Lib.v6.0:" into gCDVolume6
  77. put cd fld "Names" of cd 1 into gCdNameList6
  78. put cd fld "Ids" of cd 1 into gCdIDList6
  79. put cd fld "Applications" of cd 1 into gAppList6
  80. if gGlobalInit6 = "" then
  81. if thereIsAFile(PreferencesPath()&"Global Data") then
  82. lock screen
  83. RestoreGlobals
  84. pass  openStack
  85. exit openStack
  86. end if
  87. spinCursor
  88. --‚Ä¢‚Ä¢ Check heap
  89. if the heapspace < 100000 then
  90. answer "HyperCard may run out of memory. Please quit "&¬¨
  91. "and provide more memory for HyperCard." with "Stay" or "Quit"
  92. if it = "Quit" then send "Domenu Quit HyperCard" to HyperCard
  93. end if
  94. if top of cd window < 20 then hide menuBar
  95. --‚Ä¢‚Ä¢ Init Globals
  96. put true into gGlobalInit6
  97. put trim(long name of this stack) into gMainStack6
  98. if number of this cd is not 1 then
  99. spinCursor
  100. push cd
  101. set lockmessages to true
  102. set lockscreen to true
  103. set lockrecent to true
  104. put true into pushed
  105. go cd 1
  106. else put false into pushed
  107. spinCursor
  108. put "Map" into gLastMenu6
  109. put long id of cd "Map" into RPStackName
  110. if pushed then
  111. spinCursor
  112. pop cd
  113. set lockmessages to false
  114. set lockscreen to false
  115. set lockrecent to false
  116. end if
  117. put MFisRunning() into MFinder
  118. if not MFinder then titleBar Hide
  119. --‚Ä¢‚Ä¢ Build global to hold paths - 1 (Not used), 2 Application Path,
  120. --   3 Electronic Forms Path
  121. put ""& return & "5-Fonts & Software:" & return &"1-Reference:Electronic Forms:"¬¨
  122. into gPaths6
  123. --‚Ä¢‚Ä¢ Set stored menu choices for each cd
  124. --   17 for Graphics Library, 18 for Literature Guide
  125. put ",0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" into gMenuSelection6
  126.  
  127. if (gCDVolume6 is not in volumeList()) then
  128. put true & return & "Volume" into gNoLaunch6
  129. end if
  130. --‚Ä¢‚Ä¢ Get Color Stuff
  131. SwitchXRoo
  132. put the result into temp
  133. if temp contains "Color QuickDraw not available" then
  134. put 1 & return & 1 & return & 1 into gTheDepths6
  135. else if temp contains "Error" then
  136. beep
  137. put true & return & "Monitor" into gNoLaunch6
  138. answer "Unable to get details about your monitor(s).  You "&¬¨
  139. "must open presentations manually."
  140. else
  141. put number of lines of char 1 to offset("HasMenuBar",temp) of temp into theLine
  142. if gTheDepths6 is not "" then
  143. --‚Ä¢‚Ä¢ Save current depth
  144. put item 6 of line theLine of temp into line 2 of gTheDepths6
  145. else
  146. --‚Ä¢‚Ä¢ Save startup screen depth & current depth & Max Depth
  147. put item 6 of line theLine of temp & return & item 6 of line theLine of temp &¬¨
  148. return & last item of line theLine of temp into gTheDepths6
  149. end if
  150. end if
  151. end if
  152. pass openstack --// DG
  153. end openStack
  154.  
  155. on resume
  156. getHomeInfo
  157. send openCard to this cd
  158. unlock screen with dissolve very fast
  159. end resume
  160.  
  161. on suspend
  162. archiveGlobals
  163. pass suspend
  164. end suspend
  165.  
  166. on archiveGlobals
  167. global gMainStack6,gCdNameList6,gCdIDList6,MFinder,gOtherCdList6
  168. global gCDVolume6,gGlobalInit6,gLastMenu6,gMenuSelection6
  169. global gCardTitles,gFindString,gOldScroll
  170. global gPaths6,gAppList6,gTheDepths6,gNoLaunch6,RPStackName
  171. spinCursor
  172. put PreferencesPath()&"Global Data" into fileName
  173. put "gMainStack6,gCdNameList6,gCdIDList6,MFinder,gOtherCdList6,"&¬¨
  174. "gCDVolume6,gGlobalInit6,gLastMenu6,gMenuSelection6,gPaths6,gAppList6,gTheDepths6,"&¬
  175. "gNoLaunch6,gCardTitles,gFindString,gOldScrollRPStackName" into gblList
  176. put "" into theList
  177. repeat with z = 1 to number of items of gblList
  178. if z mod 6 = 0 then spinCursor
  179. do "put "& item z of gblList &" &" & quote &"‚âà"& quote &¬¨
  180. " after theList"
  181. end repeat
  182. open file fileName
  183. spinCursor
  184. repeat
  185. write char 1 to 16384 of theList to file fileName
  186. delete char 1 to 16384 of theList
  187. if theList = "" then exit repeat
  188. end repeat
  189. close file fileName
  190. end archiveGlobals
  191.  
  192. on RestoreGlobals
  193. global gMainStack6,gCdNameList6,gCdIDList6,MFinder,gOtherCdList6
  194. global gCDVolume6,gGlobalInit6,gLastMenu6,gMenuSelection6
  195. global gCardTitles,gFindString,gOldScroll
  196. global gPaths6,gAppList6,gTheDepths6,gNoLaunch6,RPStackName
  197. spinCursor
  198. put PreferencesPath()&"Global Data" into fileName
  199. put "gMainStack6,gCdNameList6,gCdIDList6,MFinder,gOtherCdList6,"&¬¨
  200. "gCDVolume6,gGlobalInit6,gLastMenu6,gMenuSelection6,gPaths6,gAppList6,gTheDepths6,"&¬
  201. "gNoLaunch6,gCardTitles,gFindString,gOldScrollRPStackName" into gblList
  202. open file fileName
  203. repeat
  204. spinCursor
  205. read from file fileName for 16384
  206. if it = "" then exit repeat
  207. put it after theList
  208. end repeat
  209. close file fileName
  210. repeat with z = 1 to 40
  211. if z mod 6 = 0 then spinCursor
  212. get offset("‚âà",theList)
  213. if it = 0 then exit repeat
  214. do "put char 1 to "&it-1&" of theList into "&item z of gblList
  215. delete char 1 to it of theList
  216. end repeat
  217. get deleteFile(fileName)
  218. end RestoreGlobals
  219.  
  220. on showPres presString
  221. global gMultiFinder,gTheDepths6,gPaths6,gAppList6,gCDVolume6,MFinder
  222. spinCursor
  223. put "" into appRAM
  224. --‚Ä¢‚Ä¢ Split param into vars
  225. put item 1 of presString into presPath
  226. put item 2 of presString into whichApp
  227. put item 3 of presString into availDepths
  228. put item 4 of presString into cpuReq
  229. put item 5 of presString into monitorSize
  230. --‚Ä¢‚Ä¢ Build Path to Presentation
  231. put gCDVolume6 before presPath
  232. if last char of presPath is "," then delete last char of presPath
  233. --‚Ä¢‚Ä¢ figure out which app to launch
  234. if number of chars in whichApp ‚â§ 4 then
  235. if whichApp is not "APPL" then
  236. spinCursor
  237. put lineItemOffset(whichApp,gAppList6) into lineNum
  238. put item 2 of line lineNum of gAppList6 into appName
  239. put item 3 of line lineNum of gAppList6 into appRAM
  240. put gCDVolume6&line 2 of gPaths6 before appName
  241. else
  242. put presPath into appName
  243. put "" into presPath
  244. end if
  245. else
  246. put whichApp into appName
  247. put gCDVolume6 before appName
  248. end if
  249. --‚Ä¢‚Ä¢ Check CPU (if appropriate)
  250. if cpuReq is not "" then
  251. if word 2 of item 3 of sysEnvironment() < cpuReq then
  252. answer "Sorry, this requires a Motorola"&&cpuReq&&¬¨
  253. "or faster processor." with "Cancel"
  254. exit showPres
  255. end if
  256. end if
  257. --‚Ä¢‚Ä¢ See if Application is already Open
  258. if MFinder then
  259. spinCursor
  260. put ApplicationList() into appsOpen
  261. put RemovePath(appName) into shortAppName
  262. if shortAppName is in appsOpen and¬¨
  263. "HyperCard" is not in shortAppName then
  264. answer "Sorry, the application is already open."& return &¬¨
  265. "‚ÄúContinue‚Äù will switch to the application - "&¬¨
  266. "from there you may use the ‚ÄúOpen‚Äù menu item or Quit the "&¬¨
  267. "application and re-click the ‚ÄúView‚Äù button."¬¨
  268. with "Cancel" or "Continue"
  269. if it = "Continue" then
  270. answer "The presentation you wish to view is located in "&¬¨
  271. "the folder:"& return & Pathway(presPath) with "Continue"
  272. domenu shortAppName
  273. end if
  274. exit showPres
  275. end if
  276. end if
  277. --‚Ä¢‚Ä¢ Check memory
  278. get item 6 of presString
  279. if it is not "" then
  280. put it into appRAM
  281. else
  282. --// if appRAM is empty then put something into it
  283. if "STAK" is not in whichApp and appRAM = "" then
  284. put item 1 of APPLsize(appName,"nodialog:ErrorMessage") ¬¨
  285. into minMem
  286. --// assume this error is lack of SIZE resource, not fatal error
  287. if ErrorMessage is "Could not load ‚ÄòSIZE‚Äô resources" then
  288. put 1024 into minMem
  289. put empty into ErrorMessage
  290. end if
  291. put minMem div 1024 into appRAM
  292. end if
  293. end if
  294.  
  295. if whichApp is not "STAK" then
  296. put (round (.95*(applMemory() div 1024))) into freeMem                     --// XFCN
  297. if freeMem < appRam then
  298. beep
  299. answer "There is not enough memory available to view this "&¬¨
  300. "presentation!" & return & "Required : "& appRAM & "K" & return &¬¨
  301. "Available : "&freeMem & "K"
  302. exit showPres
  303. end if
  304. else
  305. --‚Ä¢‚Ä¢¬†Check heapspace
  306. if appRAM is not "" then
  307. if the heapSpace < (appRAM*1024) then
  308. answer "The HyperCard stack you have chosen to view"&¬¨
  309. " requires "&appRAM &"K of memory.  HyperCard "&¬¨
  310. "currently does not have enough memory."& return &¬¨
  311. "To view this stack either: Quit, increase HyperCard's memory, "&¬¨
  312. "and try again; or use Single Finder." with "Try anyway" or "Cancel"
  313. if it = "Cancel" then exit showPres
  314. end if
  315. end if
  316. end if
  317. --‚Ä¢‚Ä¢ Offer option to view B/W or Color if appropriate
  318. if availDepths = "" or availDepths = 0 then
  319. put "1 2 4 8 16 24 32" into reqDepth
  320. end if
  321. if number of words of availDepths > 1 and¬¨
  322. line 3 of gTheDepths6 ‚â• 8 then
  323. answer "View in Color or B&W?" with "Color" or "B&W" or "Cancel"
  324. if it is "Cancel" then
  325. exit showpres
  326. else if it is "Color" then
  327. put 8 into reqDepth
  328. put "/C" after presPath
  329. else put 1 into reqDepth
  330. else if line 3 of gTheDepths6 = 1 then
  331. if word 1 of availDepths > line 3 of gTheDepths6 then
  332. beep
  333. answer "This presentation requires a color monitor!"
  334. exit showPres
  335. else put 1 into reqDepth
  336. else put availDepths into reqDepth
  337. --‚Ä¢‚Ä¢ Check Screen size if appropriate
  338. if monitorSize is not "" then
  339. put third item of the screenRect into actualSize
  340. if monitorSize = 13 then
  341. if actualSize < 640 then
  342. beep
  343. answer "Your monitor is not large enough to display this "&¬¨
  344. " presentation. It requires a 13‚Äù screen (or larger)."
  345. exit showPres
  346. end if
  347. end if
  348. end if
  349. --‚Ä¢‚Ä¢ Switch bit depth
  350. if number of words of reqDepth = 1 then
  351. spinCursor
  352. if reqDepth = 1 then
  353. put "gray" into colorType
  354. else put "Color" into colorType
  355. SwitchXRoo reqDepth,colorType
  356. if word 1 of the result is "Error" then
  357. beep
  358. put true & return & "Monitor" into gNoLaunch6
  359. answer "Unable to switch monitor bit depths. If you wish "&¬¨
  360. "to view the presentation, please change the bit depth "&¬¨
  361. "setting (in the Control Panel) to "& quote & reqDepth &¬¨
  362. quote &".  After setting the depth, hit the "&¬¨
  363. "‚ÄúView‚Äù button again." with "Control Panel" or "Cancel"
  364. if it = "Control Panel" then doMenu "Control Panel"
  365. exit showPres
  366. end if
  367. put reqDepth into line 2 of gTheDepths6
  368. end if
  369. --‚Ä¢‚Ä¢ Ready to open presentation
  370. spinCursor
  371. -- --@
  372. -- if presPath is not "" and there is not a file presPath then debug CheckPoint
  373. -- if appName is not "" and there is not a file appName and whichApp is not "STAK" then debug CheckPoint
  374. -- --@
  375. if presPath = "" then
  376. --‚Ä¢‚Ä¢ Stand alone demo
  377. show menuBar
  378. open appName
  379. else if appName contains "HyperCard" then
  380. --‚Ä¢‚Ä¢ go to the stack
  381. spinCursor
  382. global RPStackName
  383. put long id of this cd into RPStackName
  384. if char 2 of item 2 of the long version of stack presPath = "1" then
  385. --  answer "The stack ‚Äú"&removepath(presPath) &"‚Äù was designed to use HyperCard 1.2 "&¬¨
  386. --  "and may function unpredictably with HyperCard 2.0." with "Cancel" or "Continue"
  387. answer "The stack ‚Äú"&removepath(presPath) &"‚Äù was designed to use HyperCard 1.2. "¬¨
  388. &return&"Although it should function correctly under HyperCard 2.0, there is a possibility that unpredictable results may occur." with "Cancel" or "Continue"
  389. if it = "Cancel" then exit showPres
  390. end if
  391. ArchiveGlobals
  392. spinCursor
  393. visual iris open
  394. go stack presPath
  395. exit showPres
  396. else
  397. --‚Ä¢‚Ä¢ all other cases
  398. show menuBar
  399. open presPath with appName
  400. end if
  401. end showPres
  402.  
  403. on closeCard
  404. lock screen
  405. end closeCard
  406.  
  407. on selectLine lineNumber,fldName
  408. do ("put line lineNumber of " & fldName & " into theLine")
  409. if theLine is not "" then
  410. do ("put (number of chars of line 1 to lineNumber of" && fldName & ") + 1 into endChar")
  411. do ("select char (endChar - length of theLine) to endChar of" && fldName)
  412. end if
  413. end selectLine
  414.  
  415. on selectButton theLine,theFld
  416. show bg btn "hiliter" at item 1 of loc of bg btn "hiliter",¬¨
  417. top of theFld + (textheight of theFld*theLine)-7
  418. end selectButton
  419.  
  420. function linkedText theLine,theList
  421. subtract 1 from theLine
  422. spinCursor
  423. put "Œ©" into delim
  424. repeat for theLine
  425. delete char 1 to offset(delim,theList) of theList
  426. end repeat
  427. spinCursor
  428. return char 1 to offset(delim,theList)-1 of theList
  429. end linkedText
  430.  
  431. on LinkedStoryLine
  432. global gOtherCdList6,gLastMenu6
  433. put word 2 of the clickLine into theLine
  434. if line theLine of target = "" then exit LinkedStoryLine
  435. SpinCursor
  436. selectLine theLine,name of the target
  437. put theLine +1 & return & target into gOtherCdList6
  438. wait 8
  439. get short name of this cd
  440. if it is not "Search" then put it into gLastMenu6
  441. LinkToCard line theLine of target,"iris Open"
  442. end LinkedStoryLine
  443.  
  444. function RemovePath TheFile
  445. put number of chars of TheFile into PathLength
  446. repeat with i = PathLength down to 1
  447. if char i of TheFile = ":" then exit repeat
  448. end repeat
  449. add 1 to i
  450. if PathLength ‚â§ i then
  451. return theFile
  452. else return (char i to PathLength of TheFile)
  453. end RemovePath
  454.  
  455. on LinkToMap
  456. LinkToCard "Map","Iris Close"
  457. end linkToMap
  458.  
  459. on LinkToCard theCard,theEffect
  460. global gCdNameList6,gCdIDList6
  461. SpinCursor
  462. put line lineOffset(theCard,gCdNameList6) of gCdIDList6 into tC
  463. go cd id tC
  464. if theEffect is not "None" then
  465. if theEffect is not "" then
  466. unlock screen with theEffect
  467. else unlock screen
  468. end if
  469. get DoubleClick()
  470. end linkToCard
  471.  
  472. function thereIsAFile theFile
  473. global errGlobal
  474. return fileExists(theFile,"nodialog:errGlobal")
  475. end thereIsAFile
  476.  
  477. function PreferencesPath
  478. put systemFolder() into sysPath
  479. --‚Ä¢‚Ä¢ Verify "Preferences:ARPL 6.0:", if not create as necessary
  480. if not thereIsAFile(sysPath &"Preferences:") then
  481. NewFolder sysPath &"Preferences:"
  482. get the Result
  483. if it is not 0 then
  484. if it is not -48 then osErr it
  485. end if
  486. NewFolder sysPath &"Preferences:ARPL 6.0:"
  487. get the Result
  488. if it is not 0 then
  489. if it is not -48 then osErr it
  490. end if
  491. else if not thereIsAFile(sysPath&"Preferences:ARPL 6.0:") then
  492. NewFolder sysPath &"Preferences:ARPL 6.0:"
  493. get the Result
  494. if it is not 0 then
  495. if it is not -48 then osErr it
  496. end if
  497. end if
  498. return sysPath & "Preferences:ARPL 6.0:"
  499. end PreferencesPath
  500.  
  501. on LinkToSearch
  502. linkToCard "Search","zoom out"
  503. end LinkToSearch
  504.  
  505. on LinkToMenu
  506. LinkToCard "Main Menu","iris close"
  507. end LinkToMenu
  508.  
  509. on LinkToHelp num
  510. global gCDVolume6,helpNum
  511. get DoubleClick()
  512. lock screen
  513. push cd
  514. put gCDVolume6 & "1-Reference:‚Ä¢ARPL Stacks:Library Help" into helpPath
  515. if there is a file (helpPath) then
  516. if num = "" then
  517. put 1 into helpNum       --// General
  518. else put num into helpNum
  519. SpinCursor
  520. go stack helpPath
  521. unlock screen with dissolve fast
  522. else
  523. beep
  524. answer "Unable to locate the Help stack!" with "Cancel"
  525. end if
  526. end LinkToHelp
  527.  
  528. on LinkToQuit
  529. LinkToCard "CopyRight","barn door close"
  530. repeat until not the lockscreen
  531. unlock screen with barn door close
  532. end repeat
  533. repeat 3
  534. spinCursor
  535. wait 20
  536. end repeat
  537. end LinkToQuit
  538.  
  539. on domenu which
  540. global UserName
  541. if userName is in "Peter Meyer David Goldman" then pass domenu --@
  542. if which is in "Home Quit HyperCard" then LinkToQuit
  543. else if which is in "Recent Open Stack... New Stack...First Last Next Prev Back" then
  544. beep
  545. exit domenu
  546. else pass domenu
  547. end domenu
  548.  
  549. on arrowKey
  550. global UserName
  551. if userName = "Peter Meyer" then pass arrowKey --@
  552. beep
  553. end arrowKey
  554.  
  555. on OsErr E
  556. if E is -33 then put "Directory full" into Estr
  557. else if E is -38 then put "File not open" into Estr
  558. else if E is -39 then put "End of file" into Estr
  559. else if E is -40  then
  560. put "tried to position to before start of file (r/w)" into Estr
  561. else if E is -41 then
  562. put "memory full (open) or file won't fit (load)" into Estr
  563. else if E is -42 then put "too many files open" into Estr
  564. else if E is -47 then put "File is busy (delete)" into Estr
  565. else if E is -48 then put "duplicate filename (rename)" into Estr
  566. else if E is -50 then put "Error in user parameter list" into Estr
  567. else if E is -51 then put "refnum error" into Estr
  568. else if E is -52 then put "get file position error" into Estr
  569. else if E is -53 then
  570. put "volume not on line Error (was Ejected)" into Estr
  571. else if E is -60 then put "bad master directory block" into Estr
  572. else if E is -61 then put "write permissions Eor" into Estr
  573. else if E is -54 then
  574. put "Attempt to open locked file for writing" into Estr
  575. else if E is -46 then put "Volume locked (by software)" into Estr
  576. else if E is -45 then put "File locked" into Estr
  577. else if E is -44 then put "Volume locked (by hardware)" into Estr
  578. else if E is -43 then put "File not found" into Estr
  579. else if E is -37 then put "Bad volume or file name" into Estr
  580. else if E is -36 then put "I/O Error" into Estr
  581. else if E is -35 then put "No such volume" into Estr
  582. else if E is -34 then put "Disk is full" into Estr
  583. else if E is -49 then put "File already open for writing" into Estr
  584. else put "Failed with error" && E into Estr
  585. answer "Unable to create a Preferences folder." & return &¬¨
  586. Estr with "OK"
  587. end OsErr
  588.  
  589. on clearGlobals
  590. global gMainStack6,gCdNameList6,gCdIDList6,MFinder,gOtherCdList6
  591. global gCDVolume6,gGlobalInit6,gLastMenu6,gMenuSelection6
  592. global gCardTitles,gFindString,gOldScroll
  593. global gPaths6,gAppList6,gTheDepths6,gNoLaunch6,RPStackName
  594. spinCursor
  595. put "gMainStack6,gCdNameList6,gCdIDList6,MFinder,gOtherCdList6,"&¬¨
  596. "gCDVolume6,gGlobalInit6,gLastMenu6,gMenuSelection6,gPaths6,gAppList6,gTheDepths6,"&¬
  597. "gNoLaunch6,gCardTitles,gFindString,gOldScrollRPStackName" into gblList
  598. repeat with z = 1 to number of items of gblList
  599. do "Put empty into "& item z of gblList
  600. end repeat
  601. end clearGlobals
  602.  
  603. Function volumeName
  604. put trim(long name of this stack) into theFile
  605. repeat with i = 1 to number of chars of theFile
  606. if char i of theFile = ":" then exit repeat
  607. end repeat
  608. return (char 1 to i of theFile)
  609. end VolumeName
  610.  
  611. function trim name
  612. delete char 1 to 7 of name
  613. delete last char of name
  614. return name
  615. end trim
  616.  
  617. Function PathWay theFile
  618. repeat with i = Length of theFile down to 1
  619. if char i of theFile = ":" then exit repeat
  620. end repeat
  621. if i < 2 then
  622. return theFile
  623. else return (char 1 to i of TheFile)
  624. end PathWay
  625.  
  626. function LineOffset findText,findIn
  627. if findText is not in findIn then return 0
  628. put return & findIn & return into findIn
  629. return number of lines of (char 1 to offset(Return&findText&Return,findIn) of findIn)
  630. end LineOffset
  631.  
  632. function LineItemOffset findText,findIn
  633. if findText is not in findIn then return 0
  634. put return & findIn & return into findIn
  635. return number of lines of (char 1 to offset(Return&findText&",",findIn) of findIn)
  636. end LineItemOffset
  637.  
  638. on SpinCursor
  639. global CursID
  640. if CursID < 256 or CursID > 262 then put 256 into CursID
  641. else add 1 to CursID
  642. set cursor to CursID
  643. end SpinCursor
  644.  
  645. function DoubleClick
  646. SpinCursor
  647. wait 20
  648. return mouseClick()
  649. end DoubleClick
  650.  
  651. function thereIsAFile theFile
  652. global errGlobal
  653. return fileExists(theFile,"nodialog:errGlobal")
  654. end thereIsAFile
  655.  
  656. on UpdateCdIDs
  657. global gCdNameList6,gCdIDList6
  658. put "" into gCdNameList6
  659. put "" into gCdIDList6
  660. set lockmessages to true
  661. set lockrecent to true
  662. set lockscreen to true
  663. push cd
  664. go cd 1
  665. repeat with z = 1 to number of cds
  666. if z mod 10 = 0 then
  667. put "Updating Card Descriptor List..."& z
  668. set cursor to busy
  669. end if
  670. get short name of this cd
  671. if it contains " id " then get fld "Title"
  672. put it & return after gCdNameList6
  673. put short id of this cd & return after gCdIDList6
  674. go next
  675. end repeat
  676. go cd 1
  677. put gCdNameList6 into cd fld "Names"
  678. put gCdIDList6 into cd fld "Ids"
  679. pop cd
  680. set lockmessages to false
  681. set lockrecent to false
  682. set lockscreen to false
  683. end UpdateCdIDs</script>
  684.     <background id="2890" file="background_2890.xml" name="0" />
  685.     <background id="6335" file="background_6335.xml" name="2 Single Scroll" />
  686.     <background id="9462" file="background_9462.xml" name="find File" />
  687.     <background id="11092" file="background_11092.xml" name="4" />
  688.     <background id="13408" file="background_13408.xml" name="Pres" />
  689.     <background id="37048" file="background_37048.xml" name="" />
  690.     <card id="13593" file="card_13593.xml" marked="false" name="Title Card" owner="2890" />
  691.     <card id="3652" file="card_3652.xml" marked="false" name="Map" owner="2890" />
  692.     <card id="2078" file="card_2078.xml" marked="false" name="CopyRight" owner="2890" />
  693.     <card id="85008" file="card_85008.xml" marked="false" name="Search" owner="9462" />
  694.     <card id="60713" file="card_60713.xml" marked="false" name="Index" owner="37048" />
  695.     <card id="6846" file="card_6846.xml" marked="false" name="What's New" owner="6335" />
  696.     <card id="68535" file="card_68535.xml" marked="false" name="Service & Support" owner="6335" />
  697.     <card id="8149" file="card_8149.xml" marked="false" name="Apple" owner="6335" />
  698.     <card id="5857" file="card_5857.xml" marked="false" name="Apple Demos" owner="6335" />
  699.     <card id="6634" file="card_6634.xml" marked="false" name="Apple Products" owner="6335" />
  700.     <card id="8353" file="card_8353.xml" marked="false" name="Markets" owner="6335" />
  701.     <card id="62629" file="card_62629.xml" marked="false" name="New Product Intro" owner="6335" />
  702.     <card id="11718" file="card_11718.xml" marked="false" name="Apple Literature Guide" owner="11092" />
  703.     <card id="11871" file="card_11871.xml" marked="false" name="Apple User Groups DB" owner="11092" />
  704.     <card id="12742" file="card_12742.xml" marked="false" name="Apple Graphics Source" owner="11092" />
  705.     <card id="12921" file="card_12921.xml" marked="false" name="Graphics Library" owner="11092" />
  706.     <card id="2559" file="card_2559.xml" marked="false" name="" owner="13408" />
  707.     <card id="64094" file="card_64094.xml" marked="false" name="" owner="13408" />
  708.     <card id="63844" file="card_63844.xml" marked="false" name="" owner="13408" />
  709.     <card id="63528" file="card_63528.xml" marked="false" name="" owner="13408" />
  710.     <card id="63261" file="card_63261.xml" marked="false" name="" owner="13408" />
  711.     <card id="63103" file="card_63103.xml" marked="false" name="" owner="13408" />
  712.     <card id="62337" file="card_62337.xml" marked="false" name="" owner="13408" />
  713.     <card id="62169" file="card_62169.xml" marked="false" name="" owner="13408" />
  714.     <card id="61828" file="card_61828.xml" marked="false" name="" owner="13408" />
  715.     <card id="61666" file="card_61666.xml" marked="false" name="" owner="13408" />
  716.     <card id="61226" file="card_61226.xml" marked="false" name="" owner="13408" />
  717.     <card id="61019" file="card_61019.xml" marked="false" name="" owner="13408" />
  718.     <card id="60568" file="card_60568.xml" marked="false" name="" owner="13408" />
  719.     <card id="60182" file="card_60182.xml" marked="false" name="" owner="13408" />
  720.     <card id="60062" file="card_60062.xml" marked="false" name="" owner="13408" />
  721.     <card id="59872" file="card_59872.xml" marked="false" name="" owner="13408" />
  722.     <card id="59531" file="card_59531.xml" marked="false" name="" owner="13408" />
  723.     <card id="59332" file="card_59332.xml" marked="false" name="" owner="13408" />
  724.     <card id="58908" file="card_58908.xml" marked="false" name="" owner="13408" />
  725.     <card id="58837" file="card_58837.xml" marked="false" name="" owner="13408" />
  726.     <card id="58389" file="card_58389.xml" marked="false" name="" owner="13408" />
  727.     <card id="57862" file="card_57862.xml" marked="false" name="" owner="13408" />
  728.     <card id="57830" file="card_57830.xml" marked="false" name="" owner="13408" />
  729.     <card id="57417" file="card_57417.xml" marked="false" name="" owner="13408" />
  730.     <card id="57171" file="card_57171.xml" marked="false" name="" owner="13408" />
  731.     <card id="57024" file="card_57024.xml" marked="false" name="" owner="13408" />
  732.     <card id="56610" file="card_56610.xml" marked="false" name="" owner="13408" />
  733.     <card id="56359" file="card_56359.xml" marked="false" name="" owner="13408" />
  734.     <card id="56124" file="card_56124.xml" marked="false" name="" owner="13408" />
  735.     <card id="55923" file="card_55923.xml" marked="false" name="" owner="13408" />
  736.     <card id="55758" file="card_55758.xml" marked="false" name="" owner="13408" />
  737.     <card id="55449" file="card_55449.xml" marked="false" name="" owner="13408" />
  738.     <card id="55214" file="card_55214.xml" marked="false" name="" owner="13408" />
  739.     <card id="54931" file="card_54931.xml" marked="false" name="" owner="13408" />
  740.     <card id="54672" file="card_54672.xml" marked="false" name="" owner="13408" />
  741.     <card id="54508" file="card_54508.xml" marked="false" name="" owner="13408" />
  742.     <card id="53772" file="card_53772.xml" marked="false" name="" owner="13408" />
  743.     <card id="53674" file="card_53674.xml" marked="false" name="" owner="13408" />
  744.     <card id="53375" file="card_53375.xml" marked="false" name="" owner="13408" />
  745.     <card id="53011" file="card_53011.xml" marked="false" name="" owner="13408" />
  746.     <card id="52894" file="card_52894.xml" marked="false" name="" owner="13408" />
  747.     <card id="52265" file="card_52265.xml" marked="false" name="" owner="13408" />
  748.     <card id="52063" file="card_52063.xml" marked="false" name="" owner="13408" />
  749.     <card id="51735" file="card_51735.xml" marked="false" name="" owner="13408" />
  750.     <card id="51488" file="card_51488.xml" marked="false" name="" owner="13408" />
  751.     <card id="51337" file="card_51337.xml" marked="false" name="" owner="13408" />
  752.     <card id="51042" file="card_51042.xml" marked="false" name="" owner="13408" />
  753.     <card id="50943" file="card_50943.xml" marked="false" name="" owner="13408" />
  754.     <card id="50494" file="card_50494.xml" marked="false" name="" owner="13408" />
  755.     <card id="50392" file="card_50392.xml" marked="false" name="" owner="13408" />
  756.     <card id="50118" file="card_50118.xml" marked="false" name="" owner="13408" />
  757.     <card id="49596" file="card_49596.xml" marked="false" name="" owner="13408" />
  758.     <card id="49260" file="card_49260.xml" marked="false" name="" owner="13408" />
  759.     <card id="48753" file="card_48753.xml" marked="false" name="" owner="13408" />
  760.     <card id="48430" file="card_48430.xml" marked="false" name="" owner="13408" />
  761.     <card id="48217" file="card_48217.xml" marked="false" name="" owner="13408" />
  762.     <card id="48024" file="card_48024.xml" marked="false" name="" owner="13408" />
  763.     <card id="47833" file="card_47833.xml" marked="false" name="" owner="13408" />
  764.     <card id="47405" file="card_47405.xml" marked="false" name="" owner="13408" />
  765.     <card id="47239" file="card_47239.xml" marked="false" name="" owner="13408" />
  766.     <card id="46980" file="card_46980.xml" marked="false" name="" owner="13408" />
  767.     <card id="46601" file="card_46601.xml" marked="false" name="" owner="13408" />
  768.     <card id="46430" file="card_46430.xml" marked="false" name="" owner="13408" />
  769.     <card id="46261" file="card_46261.xml" marked="false" name="" owner="13408" />
  770.     <card id="45840" file="card_45840.xml" marked="false" name="" owner="13408" />
  771.     <card id="45591" file="card_45591.xml" marked="false" name="" owner="13408" />
  772.     <card id="44938" file="card_44938.xml" marked="false" name="" owner="13408" />
  773.     <card id="44784" file="card_44784.xml" marked="false" name="" owner="13408" />
  774.     <card id="44315" file="card_44315.xml" marked="false" name="" owner="13408" />
  775.     <card id="44222" file="card_44222.xml" marked="false" name="" owner="13408" />
  776.     <card id="43963" file="card_43963.xml" marked="false" name="" owner="13408" />
  777.     <card id="43607" file="card_43607.xml" marked="false" name="" owner="13408" />
  778.     <card id="43387" file="card_43387.xml" marked="false" name="" owner="13408" />
  779.     <card id="43113" file="card_43113.xml" marked="false" name="" owner="13408" />
  780.     <card id="42766" file="card_42766.xml" marked="false" name="" owner="13408" />
  781.     <card id="42610" file="card_42610.xml" marked="false" name="" owner="13408" />
  782.     <card id="42285" file="card_42285.xml" marked="false" name="" owner="13408" />
  783.     <card id="42101" file="card_42101.xml" marked="false" name="" owner="13408" />
  784.     <card id="41860" file="card_41860.xml" marked="false" name="" owner="13408" />
  785.     <card id="41646" file="card_41646.xml" marked="false" name="" owner="13408" />
  786.     <card id="41440" file="card_41440.xml" marked="false" name="" owner="13408" />
  787.     <card id="40481" file="card_40481.xml" marked="false" name="" owner="13408" />
  788.     <card id="40208" file="card_40208.xml" marked="false" name="" owner="13408" />
  789.     <card id="40062" file="card_40062.xml" marked="false" name="" owner="13408" />
  790.     <card id="39911" file="card_39911.xml" marked="false" name="" owner="13408" />
  791.     <card id="39500" file="card_39500.xml" marked="false" name="" owner="13408" />
  792.     <card id="39384" file="card_39384.xml" marked="false" name="" owner="13408" />
  793.     <card id="38765" file="card_38765.xml" marked="false" name="" owner="13408" />
  794.     <card id="38461" file="card_38461.xml" marked="false" name="" owner="13408" />
  795.     <card id="38351" file="card_38351.xml" marked="false" name="" owner="13408" />
  796.     <card id="38049" file="card_38049.xml" marked="false" name="" owner="13408" />
  797.     <card id="37883" file="card_37883.xml" marked="false" name="" owner="13408" />
  798.     <card id="37526" file="card_37526.xml" marked="false" name="" owner="13408" />
  799.     <card id="37353" file="card_37353.xml" marked="false" name="" owner="13408" />
  800.     <card id="36705" file="card_36705.xml" marked="false" name="" owner="13408" />
  801.     <card id="36364" file="card_36364.xml" marked="false" name="" owner="13408" />
  802.     <card id="36046" file="card_36046.xml" marked="false" name="" owner="13408" />
  803.     <card id="35665" file="card_35665.xml" marked="false" name="" owner="13408" />
  804.     <card id="35462" file="card_35462.xml" marked="false" name="" owner="13408" />
  805.     <card id="35278" file="card_35278.xml" marked="false" name="" owner="13408" />
  806.     <card id="35057" file="card_35057.xml" marked="false" name="" owner="13408" />
  807.     <card id="34587" file="card_34587.xml" marked="false" name="" owner="13408" />
  808.     <card id="34537" file="card_34537.xml" marked="false" name="" owner="13408" />
  809.     <card id="34216" file="card_34216.xml" marked="false" name="" owner="13408" />
  810.     <card id="33998" file="card_33998.xml" marked="false" name="" owner="13408" />
  811.     <card id="33695" file="card_33695.xml" marked="false" name="" owner="13408" />
  812.     <card id="33329" file="card_33329.xml" marked="false" name="" owner="13408" />
  813.     <card id="33232" file="card_33232.xml" marked="false" name="" owner="13408" />
  814.     <card id="32916" file="card_32916.xml" marked="false" name="" owner="13408" />
  815.     <card id="32755" file="card_32755.xml" marked="false" name="" owner="13408" />
  816.     <card id="32304" file="card_32304.xml" marked="false" name="" owner="13408" />
  817.     <card id="31822" file="card_31822.xml" marked="false" name="" owner="13408" />
  818.     <card id="31740" file="card_31740.xml" marked="false" name="" owner="13408" />
  819.     <card id="31409" file="card_31409.xml" marked="false" name="" owner="13408" />
  820.     <card id="31144" file="card_31144.xml" marked="false" name="" owner="13408" />
  821.     <card id="30885" file="card_30885.xml" marked="false" name="" owner="13408" />
  822.     <card id="30501" file="card_30501.xml" marked="false" name="" owner="13408" />
  823.     <card id="30256" file="card_30256.xml" marked="false" name="" owner="13408" />
  824.     <card id="30087" file="card_30087.xml" marked="false" name="" owner="13408" />
  825.     <card id="29740" file="card_29740.xml" marked="false" name="" owner="13408" />
  826.     <card id="29483" file="card_29483.xml" marked="false" name="" owner="13408" />
  827.     <card id="29279" file="card_29279.xml" marked="false" name="" owner="13408" />
  828.     <card id="29141" file="card_29141.xml" marked="false" name="" owner="13408" />
  829.     <card id="28835" file="card_28835.xml" marked="false" name="" owner="13408" />
  830.     <card id="28473" file="card_28473.xml" marked="false" name="" owner="13408" />
  831.     <card id="28348" file="card_28348.xml" marked="false" name="" owner="13408" />
  832.     <card id="27763" file="card_27763.xml" marked="false" name="" owner="13408" />
  833.     <card id="27504" file="card_27504.xml" marked="false" name="" owner="13408" />
  834.     <card id="27376" file="card_27376.xml" marked="false" name="" owner="13408" />
  835.     <card id="26922" file="card_26922.xml" marked="false" name="" owner="13408" />
  836.     <card id="26827" file="card_26827.xml" marked="false" name="" owner="13408" />
  837.     <card id="26390" file="card_26390.xml" marked="false" name="" owner="13408" />
  838.     <card id="26132" file="card_26132.xml" marked="false" name="" owner="13408" />
  839.     <card id="25868" file="card_25868.xml" marked="false" name="" owner="13408" />
  840.     <card id="25605" file="card_25605.xml" marked="false" name="" owner="13408" />
  841.     <card id="25474" file="card_25474.xml" marked="false" name="" owner="13408" />
  842.     <card id="25229" file="card_25229.xml" marked="false" name="" owner="13408" />
  843.     <card id="24947" file="card_24947.xml" marked="false" name="" owner="13408" />
  844.     <card id="24760" file="card_24760.xml" marked="false" name="" owner="13408" />
  845.     <card id="24563" file="card_24563.xml" marked="false" name="" owner="13408" />
  846.     <card id="24164" file="card_24164.xml" marked="false" name="" owner="13408" />
  847.     <card id="23769" file="card_23769.xml" marked="false" name="" owner="13408" />
  848.     <card id="23201" file="card_23201.xml" marked="false" name="" owner="13408" />
  849.     <card id="22856" file="card_22856.xml" marked="false" name="" owner="13408" />
  850.     <card id="22780" file="card_22780.xml" marked="false" name="" owner="13408" />
  851.     <card id="22305" file="card_22305.xml" marked="false" name="" owner="13408" />
  852.     <card id="22081" file="card_22081.xml" marked="false" name="" owner="13408" />
  853.     <card id="21957" file="card_21957.xml" marked="false" name="" owner="13408" />
  854.     <card id="21616" file="card_21616.xml" marked="false" name="" owner="13408" />
  855.     <card id="21370" file="card_21370.xml" marked="false" name="" owner="13408" />
  856.     <card id="20944" file="card_20944.xml" marked="false" name="" owner="13408" />
  857.     <card id="20709" file="card_20709.xml" marked="false" name="" owner="13408" />
  858.     <card id="20263" file="card_20263.xml" marked="false" name="" owner="13408" />
  859.     <card id="20195" file="card_20195.xml" marked="false" name="" owner="13408" />
  860.     <card id="19813" file="card_19813.xml" marked="false" name="" owner="13408" />
  861.     <card id="19647" file="card_19647.xml" marked="false" name="" owner="13408" />
  862.     <card id="18932" file="card_18932.xml" marked="false" name="" owner="13408" />
  863.     <card id="18594" file="card_18594.xml" marked="false" name="" owner="13408" />
  864.     <card id="18343" file="card_18343.xml" marked="false" name="" owner="13408" />
  865.     <card id="18173" file="card_18173.xml" marked="false" name="" owner="13408" />
  866.     <card id="17872" file="card_17872.xml" marked="false" name="" owner="13408" />
  867.     <card id="17614" file="card_17614.xml" marked="false" name="" owner="13408" />
  868.     <card id="17375" file="card_17375.xml" marked="false" name="" owner="13408" />
  869.     <card id="17123" file="card_17123.xml" marked="false" name="" owner="13408" />
  870.     <card id="16780" file="card_16780.xml" marked="false" name="" owner="13408" />
  871.     <card id="16509" file="card_16509.xml" marked="false" name="" owner="13408" />
  872.     <card id="16315" file="card_16315.xml" marked="false" name="" owner="13408" />
  873.     <card id="15913" file="card_15913.xml" marked="false" name="" owner="13408" />
  874.     <card id="15678" file="card_15678.xml" marked="false" name="" owner="13408" />
  875.     <card id="15387" file="card_15387.xml" marked="false" name="" owner="13408" />
  876.     <card id="15129" file="card_15129.xml" marked="false" name="" owner="13408" />
  877.     <card id="14724" file="card_14724.xml" marked="false" name="" owner="13408" />
  878.     <card id="14180" file="card_14180.xml" marked="false" name="" owner="13408" />
  879.     <card id="13292" file="card_13292.xml" marked="false" name="" owner="13408" />
  880.     <card id="12358" file="card_12358.xml" marked="false" name="" owner="13408" />
  881.     <card id="12082" file="card_12082.xml" marked="false" name="" owner="13408" />
  882.     <card id="10865" file="card_10865.xml" marked="false" name="" owner="13408" />
  883.     <card id="10749" file="card_10749.xml" marked="false" name="" owner="13408" />
  884.     <card id="10291" file="card_10291.xml" marked="false" name="" owner="13408" />
  885.     <card id="10222" file="card_10222.xml" marked="false" name="" owner="13408" />
  886.     <card id="9921" file="card_9921.xml" marked="false" name="" owner="13408" />
  887.     <card id="9712" file="card_9712.xml" marked="false" name="" owner="13408" />
  888.     <card id="9126" file="card_9126.xml" marked="false" name="" owner="13408" />
  889.     <card id="8775" file="card_8775.xml" marked="false" name="" owner="13408" />
  890.     <card id="8465" file="card_8465.xml" marked="false" name="" owner="13408" />
  891.     <card id="4451" file="card_4451.xml" marked="false" name="" owner="13408" />
  892.     <card id="4255" file="card_4255.xml" marked="false" name="" owner="13408" />
  893. </stack>
  894.